<link rel="stylesheet" href="__STATIC__mobile/css/orderlist.css">

<div class="membersbox">

<!--  pad50
	<div class="morder-search">
		<form action="">
			<div class="morder-search-wrapper clearfix">
				<div class="morder-search-input fl">
					<input type="text" name="order_no" value="" placeholder="输入订单号"
						id="">
				</div>
				<div class="morder-search-btn fr">
					<input type="submit" value="搜索">
				</div>
			</div>

		</form>
	</div>
-->
	<section class="morder_nav g-box" style="top:0px;">
		<section class="<?php echo (get('status')=='')?'cur':''; ?>">
			<a href="/mobile/orderlists/">全部</a><i></i>
		</section>
		<section class="<?php echo (get('status')==9)?'cur':''; ?>">
			<a href="/mobile/orderlists/?status=9">待付款</a><i></i>
		</section>
		<section class="<?php echo (get('status')==1)?'cur':''; ?>">
			<a href="/mobile/orderlists/?status=1">待发货</a><i></i>
		</section>
		<section class="<?php echo (get('status')==5)?'cur':''; ?>">
			<a href="/mobile/orderlists/?status=5">待收货</a><i></i>
		</section>
		
		<!--  
		<section class="<?php echo (get('status')==3)?'cur':''; ?>">
			<a href="/mobile/orderlists/?status=3">退款</a><i></i>
		</section>
		-->
		
		<!-- <section  >待评价<i></i></section> -->
	</section>

	<section class="sectionPanel" style="padding-top: 50px;">
		<section class="morder_con" style="display: block;">
			<div id="j-all">
			
				<?php if(empty($order_list)){?>
			<div id="j-delivered">
				<div style="padding: 50px 0 0; text-align: center; border: 0;">
					<img src="__STATIC__mobile/images/whitenorder.png" width="30%"
						alt="">
					<p style="padding: 10px; font-size: 16px; color: #666">暂无此类订单</p>
				</div>
			</div>
			<?php } ?>
			
				<?php foreach($order_list as $k=>$v){?>
				<section class="order-list-info clearfix">
					<a href="/mobile/orderdetail?order_id=<?php echo $v['order_id'];?>"> 
					<span class="fl">
							<p>订单：<?php echo $v['order_sn'];?></p>
							<p>日期：<?php echo $v['create_time'];?></p>
					</span> <span class="fr colorFF8F09 lh18"> <?php echo $v['status'];?> </span>
					</a>
				</section>
				<section class="morder_goods">
					<ul>
					
					<?php foreach($v['goods'] as $key=>$goods){?>
						<li class="g-box">
							<section class="morder_goods_img">
								<a>
								 <img src="<?php echo C('UPYUN_DOMAIN').$goods['goods_pic'];?>!headimgurl" width="80" height="80"
									onerror="javascript:this.src='__STATIC__mobile/images/goods.jpg';">
								</a> <span> </span>
							</section>
							<section class="morder_goods_infor g-flex">
								<a style="margin-top: 30px;"><?php echo $goods['goods_name'];?></a>
								<p></p>
							</section>
							<section class="morder_goods_rmb">
								<p>¥<?php echo $goods['shop_price'];?></p>
								<span>X <?php echo $goods['num'];?></span>
							</section>
						</li>
						
						<?php } ?>
						
					</ul>
				</section>
				<section class="morder_pay">
					<p>
						总计：<span>¥<?php echo $v['pay_money'];?></span>
					</p>
					<p>
						<!--  <a href="javascript:;" class="J_del" data-order="37370">删除订单</a>-->
						
						<?php if($v['checked'] == 0){?>
							<!--<a href="/mobile/orderdetail?order_id=<?php echo $v['order_id'];?>&showwxpaytitle=1" class="J_pay">付款</a>--> 
						<?php }else if($v['checked'] == 1){ ?>
							<!--  <a href="javascript:tuikuan('<?php echo $v['order_id'];?>');" class="J_del">退款</a>-->
						<?php }else if($v['checked'] == 3){ ?>
							<a href="javascript:quxiaotuikuan('<?php echo $v['order_id'];?>');" class="J_pay">取消退款</a>
						<?php }else if($v['checked'] == 5){ ?>
							<a href="javascript:shouhuo('<?php echo $v['order_id'];?>');" class="J_pay">确认收货</a>
						<?php } ?>
						<a href="/mobile/orderdetail?order_id=<?php echo $v['order_id'];?>&showwxpaytitle=1" class="">详情</a>
					</p>
				</section>
				
				<?php } ?>
			</div>
			

		</section>
		<include file="Common:bottom" />
</div>

<include file="Common:nav" />

<script>
/*
 * 退款
 */
function tuikuan(id){
    layer.open({
        content: "亲,你确定要退款吗?",
        btn: ['确定', '取消'],
        yes: function(index){
        	
       // 	showerror("抱歉,退款功能正在开发中,谢谢关注");
       // 	return false;
        	AjaxUrl('/mobile/ordertuikuan/?order_id='+id);
            layer.close(index);
        }
    });
}


/*
 * 确认收货
 */
function shouhuo(id){
    layer.open({
        content: "你已经收到货物了吗?",
        btn: ['已收到', '取消'],
        yes: function(index){
        //	showerror("抱歉,退款功能正在开发中,谢谢关注");
        //	return false;
        	AjaxUrl('/mobile/ordershouhuo/?order_id='+id);
            layer.close(index);
        }
    });
}


/*
 * quxiaotuikuan
 */
 function quxiaotuikuan(id){
	    layer.open({
	        content: "亲,你确定要取消退款吗?",
	        btn: ['确定', '取消'],
	        yes: function(index){
	        	AjaxUrl('/mobile/ordertuikuan/cancel?order_id='+id);
	            layer.close(index);
	        }
	    });
	}
</script>

